﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using AllenalaMente.State;
using Microsoft.Phone.Tasks;

namespace AllenalaMente.Menu
{
    public partial class CreditsMenu : PhoneApplicationPage
    {
        //Tasks
        private WebBrowserTask task;
        private MarketplaceSearchTask searchTask;
        private EmailComposeTask mailTask;

        public CreditsMenu()
        {
            InitializeComponent();


            creatorsText.Text = Locale.Strings.Creators;
            buttonProducts.Content = Locale.Strings.TryProducts;
            buttonMail.Content = Locale.Strings.SendBugs;
            buttonWeb.Content = Locale.Strings.Website;

            Animation.FadeIn(this, 500);

            task = new WebBrowserTask();
            mailTask = new EmailComposeTask();
            searchTask = new MarketplaceSearchTask();
        }

        private void buttonProducts_Click(object sender, RoutedEventArgs e)
        {
            searchTask.SearchTerms = "Carousel Team";
            searchTask.Show();
        }

        private void buttonWeb_Click(object sender, RoutedEventArgs e)
        {
            task.URL = "www.carouselteam.com";
            task.Show();
        }

        private void buttonMail_Click(object sender, RoutedEventArgs e)
        {
            mailTask.To = "info@carousel.com";
            mailTask.Subject = "Allena la Mente - info/Bugs";
            mailTask.Show();
        }
    }
}
